#ifndef	RTL8019_H
#define	RTL8019_H

//#define	__FS44B0
//#define	__ST44B0
//#define	__LZ44B0

#ifdef	__FS44B0
#define	ADDR_SFT		0
#elif defined __ST44B0
#define	ADDR_SFT		1
#define	RTL8019_OP_16
#elif defined __LZ44B0
#define	ADDR_SFT		8
#define	RTL8019_OP_16
#else
#define	ADDR_SFT		1
#define	RTL8019_OP_16
#endif

#define	BaseAddr	0x6000000
#define	RWPORT	(BaseAddr+(0x10<<ADDR_SFT))	/* dma read write address, form 0x10 - 0x17 */
#define	RstAddr (BaseAddr+(0x18<<ADDR_SFT))	/* reset register, 0x18, 0x1a, 0x1c, 0x1e even address is recommanded */

/* page 0 */
#define	Pstart	(BaseAddr+(1<<ADDR_SFT))	/* page start */
#define	Pstop	(BaseAddr+(2<<ADDR_SFT))	/* page stop */
#define	BNRY	(BaseAddr+(3<<ADDR_SFT))	
#define	TPSR	(BaseAddr+(4<<ADDR_SFT))	/* transmit page start */
#define	TBCR0	(BaseAddr+(5<<ADDR_SFT))
#define	TBCR1	(BaseAddr+(6<<ADDR_SFT))
#define	ISR		(BaseAddr+(7<<ADDR_SFT))	/* interrupt status register */

#define	RSAR0	(BaseAddr+(8<<ADDR_SFT))	/* dma read address */
#define	RSAR1	(BaseAddr+(9<<ADDR_SFT))
#define	RBCR0	(BaseAddr+(10<<ADDR_SFT))	/* dma read byte count */
#define	RBCR1	(BaseAddr+(11<<ADDR_SFT))

#define	RCR		(BaseAddr+(12<<ADDR_SFT))	/* receive config */
#define	TCR		(BaseAddr+(13<<ADDR_SFT))	/* transmit config */
#define	DCR		(BaseAddr+(14<<ADDR_SFT))	/* data config */
#define	IMR		(BaseAddr+(15<<ADDR_SFT))	/* interrupt mask */

#define	ID8019L	(BaseAddr+(10<<ADDR_SFT))
#define	ID8019H	(BaseAddr+(11<<ADDR_SFT))

/* page 1 */
#define	PAR0	(BaseAddr+(1<<ADDR_SFT))
#define	PAR1	(BaseAddr+(2<<ADDR_SFT))
#define	PAR2	(BaseAddr+(3<<ADDR_SFT))
#define	PAR3	(BaseAddr+(4<<ADDR_SFT))
#define	PAR4	(BaseAddr+(5<<ADDR_SFT))
#define	PAR5	(BaseAddr+(6<<ADDR_SFT))

#define	CURR	(BaseAddr+(7<<ADDR_SFT))		
#define	MAR0	(BaseAddr+(8<<ADDR_SFT))
#define	MAR1	(BaseAddr+(9<<ADDR_SFT))
#define	MAR2	(BaseAddr+(10<<ADDR_SFT))
#define	MAR3	(BaseAddr+(11<<ADDR_SFT))
#define	MAR4	(BaseAddr+(12<<ADDR_SFT))
#define	MAR5	(BaseAddr+(13<<ADDR_SFT))
#define	MAR6	(BaseAddr+(14<<ADDR_SFT))
#define	MAR7	(BaseAddr+(15<<ADDR_SFT))

/* page 2 */

/* page 3 */
#define	CR9346	(BaseAddr+(1<<ADDR_SFT))
#define	CONFIG0	(BaseAddr+(3<<ADDR_SFT))
#define	CONFIG1	(BaseAddr+(4<<ADDR_SFT))
#define	CONFIG2	(BaseAddr+(5<<ADDR_SFT))
#define	CONFIG3	(BaseAddr+(6<<ADDR_SFT))

#endif